let cookies = document.cookie;
let cookie = {};
cookies = cookies.split("; ");
cookies.forEach((x, y) => {
  cookie[x.split("=")[0]] = x.split("=")[1];
});
function get(str) {
  return cookie[str]||false;
}
function set(name,value,time){
  document.cookie=`${name}=${value};expires=${time}`
}
function del(name){
  document.cookie=`${name}=11;max-age=0`
}
module.exports = {
  get,set,del
};
